home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2a.lha / p4-1.2a / bin / makefuncs < prev    next >
Text File  |  1992-10-19  |  366b  |  16 lines

  1. #!/bin/csh -f
  2.  
  3. #    Create the funcdecls.h file from the source in the directory
  4.  
  5. if ($#argv == 0) then
  6.     set files="*.c"
  7. else
  8.     set files="$*"
  9. endif
  10.  
  11. grep '^[A-Za-z].*)[^;]*$' $files | sed 's/^[^:]*://' | \
  12.     grep -v '^[     ]*static' | egrep -v '([^a-z_])?main\(' | \
  13.     sed -e 's/ *$//' -e '/^[^ ]*$/s/^/int /' | sed 's/$/;/' | \
  14.     sed 's/(.*)/()/' | \
  15.     sort +1 | uniq
  16.